IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[cms_sp_MediaSave]') AND type in (N'P', N'PC'))
	DROP PROCEDURE [dbo].[cms_sp_MediaSave]
GO
create procedure [dbo].[cms_sp_MediaSave]
@Id int,
@SiteId int = null,
@SiteGroupId int = null,
@FolderName nvarchar(250),
@Description nvarchar(500) = null,
@LastUpdatedBy int,
@DateLastUpdated datetime,
@ParentMediaId int = null
as
update dbo.Media
set SiteId = @SiteId,		
	SiteGroupId = @SiteGroupId,
	FolderName = @FolderName,
	[Description] = @Description,
	LastUpdatedBy = @LastUpdatedBy,
	DateLastUpdated = @DateLastUpdated,
	ParentMediaId = @ParentMediaId
where MediaId = @Id


GO

